#include "myhead.h"
//增加ip
void ip_add(const char *newip,int port,int fd,const char *name)
{
    ip *n = malloc(sizeof(ip));
    n->data. = fd;
    strncpy(n->data.ip, newip, sizeof(n->data.ip));
    n->data.port = port;
    strncpy(n->data.name, name, sizeof(n->data.name));
    pthread_mutex_lock(&g_list_mtx);

    g_list = n;
    pthread_mutex_unlock(&g_list_mtx);
}
